package edu.lingnan.house.controller;

import edu.lingnan.house.service.SecondHandHouseService;
import edu.lingnan.house.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/seocndHand")
public class ResidentialQuartersController {
    @Autowired
    private SecondHandHouseService secondHandHouseService;
    //显示二手房页面
    @ResponseBody
    @GetMapping("/selectSecondHand")
    public Result selectSecondHand(Integer minArea,Integer maxArea,Double minPrice,Double maxPrice,String address,Integer roomSum){
            return  secondHandHouseService.selectSecondHand(minArea, maxArea, minPrice, maxPrice, address, roomSum);
    }
}
